const { ipcMain } = require('electron');

module.exports.pong = () => {


    ipcMain.on('asynchronous-message', (event, arg) => {
        console.log('asynchronous-message', arg) // prints "ping"
        event.reply('asynchronous-reply', 'pong async');
    })

    ipcMain.on('synchronous-message', (event, arg) => {
        console.log(arg) // prints "ping"
        event.returnValue = 'pong sync'
    })
}